package org.sgx.gapigui.client.ui.editableModels.drive;

import org.sgx.gwteditors.client.impl1.edbean.EditableBean;
import org.vectomatic.file.File;

import com.google.gwt.core.client.GWT;

public abstract class DriveFile implements EditableBean {
String title, description, created, mimeType, size, content;

public String getTitle() {
	return title;
}

public void setTitle(String title) {
	this.title = title;
}

public String getDescription() {
	return description;
}

public void setDescription(String description) {
	this.description = description;
}

public String getCreated() {
	return created;
}

public void setCreated(String created) {
	this.created = created;
}

public String getMimeType() {
	return mimeType;
}

public void setMimeType(String mimeType) {
	this.mimeType = mimeType;
}

public String getSize() {
	return size;
}

public void setSize(String size) {
	this.size = size;
}

public String getContent() {
	return content;
}

public void setContent(String content) {
	this.content = content;
}

public static DriveFile from(File file) {
	DriveFile f = GWT.create(DriveFile.class); 
	f.setTitle(file.getName()); 
	f.setMimeType(file.getType()); 
	f.setSize(file.getSize()+""); 
	return f;
} 


}
